//
// Created by lenovo on 2024/5/27.
//

#include "view.h"
#include "utils.h"

vector<vector<char> > rend (vector<vector<bool> > focus , char alive , char died ){
    auto& horizon = focus;

    vector<vector<char> > view (
            horizon.size() ,
            vector<char> (horizon.at(0).size())
    );

    for (int x = 0 ; x < horizon.size() ; x ++){
        for (int y = 0 ; y < horizon.at(0).size() ; y ++){
            if (horizon[x][y]){
                view[x][y] = alive ;
            }else{
                view[x][y] = died ;
            }
        }
    }

    return view ;
}